<%--
    Document   : paziente
    Created on : 7-dic-2011, 13.08.07
    Author     : sestari
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <link rel="stylesheet" type="text/css" href="../style_generale.css" />
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

            <f:loadBundle basename="message.message" var="msg"/>
            <title> <h:outputText value="#{msg.paginasinpaz}"/> </title>

        </head>
        <body>
        <body>                      
            <h:form>                        
                <h:selectOneMenu id="combo" value="#{beanMedico.idpaziente}" onchange="submit()" immediate="true"  styleClass="buttoncomlu">           
                    <f:selectItems value="#{beanMedico.nomeSemPassComboBox}"  />
                </h:selectOneMenu>
            </h:form>

            <h:form>
                <h:dataTable value="#{beanMedico.nomeSemPass}" var="listaPazienti" 
                             style="overflow:auto; width:100%; height:50px"
                             styleClass="orders" headerClass="ordersHeader" columnClasses="evenColumn,oddColumn"> 
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.nome}"/>
                        </f:facet>
                        <h:outputText value="#{listaPazienti.nome}"/> 
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.cognome}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.cognome}"/> 
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.nome}"/>
                        </f:facet>
                        <h:inputText  id="user" value="#{beanForminserire_paziente.username}" styleClass="campoUptade" required="true" requiredMessage="Invalid!" validator="#{beanValidador.verificaUserName}"/>
                        <h:message for="user" styleClass="errors"  showSummary="no" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.pass}"/>
                        </f:facet>
                        <h:inputSecret id="pass" value="#{beanForminserire_paziente.password}" styleClass="campoUptade" maxlength="45" required="true" requiredMessage="Invalid!"/>
                        <h:message for="pass" styleClass="errors"  showSummary="no" />
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.pass}"/>
                        </f:facet>
                        <h:commandButton value="Insert" action="#{beanForminserire_paziente.inserirePazeinte()}" styleClass="buttoncombo"/>
                        <h:messages globalOnly="true" styleClass="errors"/>
                    </h:column>

                </h:dataTable>
            </h:form>

            <h:form>
                <h:commandButton value="#{msg.back}" action="back" styleClass="button"/>                
            </h:form>
            <br>
            <br>
            <br>
            <%@ include file="/lingua/lingua.jsp" %>
        </body>
        <html>
        </f:view>
